package com.jdls.tanhua.dubbo.impl;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.jdls.tanhua.dubbo.TextApi;
import com.jdls.tanhua.dubbo.mapper.TextMapper;
import com.jdls.tanhua.pojo.Questionnaire;
import com.jdls.tanhua.pojo.Text;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@DubboService
public class TextImpl implements TextApi {

    @Autowired
    private TextMapper textMapper;

    @Override
    public Map find(List<Integer> qid) {
        Map<Integer,Text> map = new HashMap();
        for (Integer id : qid) {
            Text text = textMapper.selectById(id);
            map.put(id,text);
        }
        return map;
    }
}
